package com.hst.capacity.infra.persistence.jpa.order.specialcar;

import com.hst.capacity.domain.model.entity.order.pool.OrderPoolEntity;
import com.hst.capacity.domain.model.entity.order.specialcar.SpCarOrderHistoryEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

public interface SpCarOrderHistoryRepository extends JpaRepository<SpCarOrderHistoryEntity, String>, JpaSpecificationExecutor<SpCarOrderHistoryEntity> {

    @Query("select t from SpCarOrderHistoryEntity t where t.externalOrderId = ?1")
    SpCarOrderHistoryEntity findByExternalOrderId(String externalOrderId);

    @Query("select t from SpCarOrderHistoryEntity t where t.idOrder = ?1")
    SpCarOrderHistoryEntity findByIdOrder(String idOrder);

}

